package com.ruanhb.wsp.service;

import com.ruanhb.wsp.vo.BaseResponse;
import com.ruanhb.wsp.vo.City;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * Created by r on 2018-9-21
 */
@FeignClient(name = "wsp-zuul" , fallback = DataClientFallBack.class )
public interface DataClient {

    @GetMapping("/city/cities")
    List<City> cityList();

    @GetMapping("/data/weather/cityId/{cityId}")
    BaseResponse getDataByCityId(@PathVariable("cityId") String cityId);

}
